package com.sharker.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.sharker.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 1.类的用途：显示课后测试成绩的界面
 * 2.作者：${赵渊} on 2017/4/16 18:49
 */
public class ShowResultActivity extends BaseActivity{

    @BindView(R.id.course_rel)
    RelativeLayout mCourse_rel;
    @BindView(R.id.review_title)
    TextView review_title;
    @BindView(R.id.review_TvScore)
    TextView review_TvScore;
    @BindView(R.id.review_TvPass)
    TextView review_TvPass;
    @BindView(R.id.courseReturn)
    Button courseReturn;
    @BindView(R.id.againBtn)
    Button againBtn;
    @BindView(R.id.againBtn_pass)
    Button againBtn_pass;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.review_score_layout);
        ButterKnife.bind(this);
        Intent intent = getIntent();
        if(intent != null){
            int score = intent.getIntExtra("score",0);
            review_TvScore.setText(score+"分");
            if(score < 60){
                review_TvPass.setText("不合格");
            }else{
                review_TvPass.setText("合格");
                mCourse_rel.setVisibility(View.GONE);
                againBtn_pass.setVisibility(View.VISIBLE);
            }
        }
    }
    //返回课程按钮
    @OnClick(R.id.courseReturn)
    public void courseReturnClick(){

    }

    //再考一次按钮
    @OnClick(R.id.againBtn)
    public void againBtnClick(){
        finish();
    }

    //通过之后返回课程
    @OnClick(R.id.againBtn_pass)
    public void againBtn_passClick(){

    }




}
